package hu.szte.ovrt.mzst;

import java.util.HashSet;
import java.util.Set;

public class Literal {
	
	public static final String BLOCK_START = "{";
	public static final String BLOCK_END = "}";
	
	public static final String CREATE_FILE = "letrehoz";
	public static final String CREATE_DIRECTORY = "letrehozkonyvtarat";
	public static final String COPY = "masol";
	public static final String DELETE_FILE = "torol";
	public static final String DELETE_DIRECTORY = "torolkonyvtarat";
	public static final String MOVE = "mozgat";
	
	public static final Set<String> TWO_OPERAND_OPERATIONS = new HashSet<String>();
	static {
		TWO_OPERAND_OPERATIONS.add(COPY);
		TWO_OPERAND_OPERATIONS.add(MOVE);
	}
	
	public static final Set<String> ONE_OPERAND_OPERATIONS = new HashSet<String>();
	static {
		ONE_OPERAND_OPERATIONS.add(CREATE_FILE);
		ONE_OPERAND_OPERATIONS.add(CREATE_DIRECTORY);
		ONE_OPERAND_OPERATIONS.add(DELETE_FILE);
		ONE_OPERAND_OPERATIONS.add(DELETE_DIRECTORY);
	}
	
	public static final Set<String> OPERATIONS = new HashSet<String>();
	static {
		OPERATIONS.addAll(ONE_OPERAND_OPERATIONS);
		OPERATIONS.addAll(TWO_OPERAND_OPERATIONS);
	}
	
	public static final Set<String> ALL_KEYWORD = new HashSet<String>();
	static {
		ALL_KEYWORD.addAll(OPERATIONS);
		ALL_KEYWORD.add(BLOCK_START);
		ALL_KEYWORD.add(BLOCK_END);
	}
	
	
	public static final String MENU_TITLE = 
			"Kerem valasszon a kovetkezok kozul:";
	public static final String MENU_PARSE = 
			"1) Script vegrehajtasa";
	public static final String MENU_HELP = 
			"2) Segitseg";
	public static final String MENU_EXIT = 
			"3) Kilepes";
	
	
	public static final String MENU = 
			MENU_TITLE + "\n" + 
			MENU_PARSE + "\n" +
			MENU_HELP + "\n" +
			MENU_EXIT;

	public static final String HELP_TEXT = 
			"Vegrehajhato muveletek:\n" +
			"\t" + COPY + " [FROM] [TO]\t\tfajl masolasa\n" +
			"\t" + MOVE + " [FROM] [TO]\t\tfajl mozgatasa\n" +
			"\t" + CREATE_FILE + " [FILE]\t\t\tfajl letrehozasa\n" +
			"\t" + CREATE_DIRECTORY + " [DIR]\tkanyvtar letrehozasa\n" +
			"\t" + DELETE_FILE + " [FILE]\t\t\tfajl torlese\n" +
			"\t" + DELETE_DIRECTORY + " [DIR]\t\tkonyvtar torlese\n" + 
			"Osszetett muveletek adhatok meg kapcsoszarojelek kozott!\n";
	
	public static final String EXIT = "exit";
	
	public static final String PARSER_TEXT = 
			"Kerem gepelje be a scriptet! \n" +
			EXIT + " parancs hatasara barmikor vissza tud lepni a fomenube!";
	
	public static Set<String> validCommands = new HashSet<String>();
	
	static {
		validCommands.add("1");
		validCommands.add("2");
		validCommands.add("3");
	}
	
	public static final String INVALID_SYNTAX = "Ervenytelen szintaxis!";
	public static final String INVALID_OPERATION = "Nem letezo muvelet!";
	public static final String BAD_OPERAND = "Hibas paramater!";	
	
	public static final String INVALID_MENU_ITEM = "Ervenytelen menuelem!";
	
	public static final String BLOCK_EXEC_CONFIRM = 
			"Valoban vegre szeretnek hajtani a kovetkezo utasitasokat? (i/n)";
	
	public static final String YES = "i";
	public static final String NO = "n";
	
	public static final String INVALID_YES_OR_NO = "Ervenytelen, i/n?";


}
